using UnityEngine;
using System.Collections;

public class Model : MonoBehaviour 
{
	public Synch synch;
	private UnitSpawner spawner;
	//private int map;
	public int playerNum;
	
	public void Start()
	{
		spawner = synch.spawner;
	}
	public void MouseMessage(MouseMes mes)
	{
		spawner.unitList[playerNum].SeekTarget.AddFirst(new Vector3(mes.mPos.x, mes.mPos.y));
	}
	public void SystemMessage(SystemMessage mes)
	{
		switch(mes.type)
		{
		case SystemMessageType.ASSIGN_PLAYER_NUM:
		{
		}
		break;
		case SystemMessageType.ASSIGN_PLAYER_TEAM:
		{
		}
		break;
		case SystemMessageType.SET_MAP:
		{
			//TODO choose and load map
		}
		break;
		};
	}
	public void Update()
	{
	}
}
